import { ref } from "vue";
import { parseTime } from "@/utils/ruoyi";
import type { AvueCrudOption } from "@smallwei/avue";

export default function () {
  const option: AvueCrudOption = {
    rowKey: "menuId",
    align: "center",
    index: true,
    indexLabel: "序号",
    delBtn: false,
    searchShow: false,
    column: [
      {
        prop: "dictName",
        label: "字典名称",
        search: true,
      },
      {
        prop: "dictType",
        label: "字典类型",
        search: true,
      },
      {
        prop: "status",
        label: "状态",
      },
      {
        prop: "remark",
        label: "备注",
      },
      {
        prop: "createTime",
        label: "创建时间",
        formatter: (row: any) => {
          return parseTime(row.createTime);
        },
      },
    ],
  };

  return ref(option);
}
